The present invention relates to generation and utilization of teaching data of a robot and, more particularly, to a method and apparatus for generating and applying teaching data whereby teaching data of one robot can be commonly used for another robot.
A servo command value for a robot is frequently indicated by joint angles, e.g. .theta..sub.1A, .theta..sub.2A shown in FIG. 3A. There is a relation of EQU X(P)
between joint angles and a command position D.sub.A by a mechanism parameter P including the angle .theta..sub.2A. X denotes a vector indicative of the position and orientation of a robot. P is a mechanism parameter indicative of the length of arm, attaching angle, or the like.
When considering a 2 degree-freedom SCARA robot shown in, e.g., FIG. 4A, the command values are .theta..sub.1 and .theta..sub.2 in FIG. 4B. (Although the definitions of the .theta..sub.1 and .theta..sub.2 differ in every robot, they are defined as shown in FIG. 4B in this example). Only arm lengths r.sub.1 and r.sub.2 are provided as mechanism parameters. Consequently, the following equation is derived. ##EQU1##
On the contrary, joint angles can be also obtained from X(P) by the well-known coordinates transformation of a robot.
For instance, in the case of FIGS. 4A and 4B, assuming that ##EQU2## .theta..sub.1 and .theta..sub.2 can be obtained by ##EQU3##
However, since the mechanism parameter P includes the assembling error and the machining error of the dimensions and angle .DELTA.P (which is referred to as the mechanism errors) which occur upon working, even if the robot is operated in accordance with a command value, the robot does not reach the command position D.sub.A but actually moves to a position T.sub.A.
For example, when the arm lengths r.sub.1 and r.sub.2 of the robot shown in FIG. 4A include errors of .DELTA.r.sub.1 and .DELTA.r.sub.2, if .theta..sub.1 and .theta..sub.2 are given, the robot does not reach the position D.sub.A ##EQU4## but it obviously moves to the position T.sub.A ##EQU5##
Further, if the origin positions (the positions when .theta.=0) of .theta..sub.1 and .theta..sub.2 are deviated by .DELTA..theta..sub.1 and .DELTA..theta..sub.2, the equation (4) becomes as follows. ##EQU6##
That is, even if the robot is desired to move to the position D.sub.A of the equation (3) by using (r.sub.1, r.sub.2, .theta..sub.1, .theta..sub.1), the robot arrives at the position T.sub.A of the equation (5) due to (.DELTA.r.sub.1, .DELTA.r.sub.2, .DELTA..theta..sub.1, .DELTA..theta..sub.2).
In other words, when the robot is controlled by the command position D.sub.A =X(P), the robot eventually reaches the position T.sub.A =X(P+.DELTA.P). Therefore, the operator performs a teaching work for allowing the robot to be positioned to the actual position T.sub.A, and the command position X(P) is stored as teaching data into a memory, and playback processes are executed on the basis of this teaching data.
A method of obtaining the mechanism error .DELTA.P has been disclosed in U.S. Pat. No. 4,670,849 by Okada et al, filed on June 2, 1987. On the other hand, a method of obtaining what is called a coordinates transformation equations corresponding to the equations (1) and (2) suitable for general robots such as robots other than the SCARA robot has been disclosed in detail in Richard P. Paul, "Robot Manipurators: Mathematics, Programming and Control", The MIT Press.
In the case of using a plurality of robots of the same type, there is a large demand such that the data taught to one of the robots is used even for the other robots. However, since the mechanism error .DELTA.P of the robot as mentioned above differs in each robot, the data taught to one robot cannot be directly used for the other robots. Therefore, hitherto, when the teaching data is implanted to the other robots, the complicated adjustments of the positioning points are executed by using a teaching box after the teaching data was implanted. Namely, hitherto, the teaching data cannot be mutually used by the other robots.